﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ScriptEditor.Commands
{
    class Command_CreateMask : Command
    {
        public string name
        {
            get
            {
                return Value1;
            }
            set
            {
                Value1 = value;
            }
        }
        public int orderInLayer
        {
            get
            {
                return int.TryParse(Value2, out int result) ? result : 0;
            }
            set
            {
                Value2 = value.ToString();
            }
        }
        public Command_CreateMask()
        {
            CommandType = COMMANDTYPE.CreateMask;
            name = "请输入遮罩层名称";
            orderInLayer = 0;
            Wait = true;
        }
        public Command_CreateMask(string Name, int OrderInLayer)
        {
            CommandType = COMMANDTYPE.CreateMask;
            name = Name;
            orderInLayer = OrderInLayer;
            Wait = true;
        }
        public override string ToString()
        {
            return CommandType.ToString() + ":\n" + "创建遮罩层:" + name;
        }
    }
}
